var urlobj;
var urlobj2;

function BrowserServer(obj,obj2)
{
	urlobj = obj;
	urlobj2=obj2;

	OpenServerBrowser(
		'../fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/aspx/connector.aspx',
		screen.width * 0.7,
		screen.height * 0.7 ) ;
}

function OpenServerBrowser( url, width, height )
{
	var iLeft = (screen.width  - width) / 2 ;
	var iTop  = (screen.height - height) / 2 ;

	var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
	sOptions += ",width=" + width ;
	sOptions += ",height=" + height ;
	sOptions += ",left=" + iLeft ;
	sOptions += ",top=" + iTop ;

	var oWindow = window.open( url, "BrowseWindow", sOptions ) ;
}

function SetUrl( url, width, height, alt )
{
	document.getElementById(urlobj).value =  url ;
	if(urlobj2){
	    document.getElementById(urlobj2).href =  url ;
	}
	oWindow = null;
}
